<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>吾爱直播</title>
    <link rel="stylesheet" href="css/index3.css">
</head>
<body>
    <section>
        <div id="img">
            <img src="image/logo2x.png" alt="" class="logo">
        </div>
        <div id="btn">
            <img src="image/anzhuo2x.png" alt="" class="img">
            <img src="image/xiazai2x.png" alt="" class="img">
        </div>
    </section>

    <article>
        <div id="pic">
            <img src="image/hb_item.png" alt="" class="pic-left">
            <img src="image/字.png" alt="" class="pic-right">
            <form>
                <input type="text" placeholder="输入手机号">
                <input type="text" placeholder="输入验证码">
                <a id="btn-send">发送</a>
            </form>
            <button></button>
        </div>
    </article>

    <script src="js/jquery.min.js"></script>
    <script src="js/layer.js"></script>
    <script>
        $('button').click(function () {
            layer.alert('恭喜您，领取成功', {
                icon: 6,
            });
        });
    </script>

    <script>
        var btn = document.getElementById("btn-send")
        var wait = 60;
        function time(o){
            if(wait == 0){
                o.removeAttribute("disabled")
                o.innerHTML = "免费获取验证码"
                wait = 60
            }else{
                o.setAttribute("disabled",true)
                o.innerHTML = wait + "秒后可以重新发送"
                wait--
                setTimeout(function() {
                    time(o)
                }, 1000);
            }
        }
        btn.onclick = function(){time(this)}
    </script>
</body>
</html>